using Microsoft.SharePoint;
namespace Samples.WebControls
{
    /// <summary>
    /// Defines an object that will hold the Multimedia values for the new field control
    /// </summary>
    public class MultimediaFieldValue : SPFieldMultiColumnValue
    {
            private const int NUMBER_OF_FIELDS = 3;

            //Basic Contructor
            public MultimediaFieldValue()
                : base(NUMBER_OF_FIELDS)
            { }

            //using a string value
            /// <summary>
            ///  Build a MultimediaFieldValue 
            /// </summary>
            /// <param name="value">Values used to build the Multimedia object</param>
            public MultimediaFieldValue(string value)
                : base(value)
            { }

            /// <summary>
            /// Returns a string the holds the url pointing to the multimedia file 
            /// </summary>
            public string Url
            {
                get { return this[0]; }
                set { this[0] = value; }
            }

            
            /// <summary>
            /// Returns a string the represent the width of the multimedia element 
            /// on pixels rendered on a Web Page
            /// </summary>
            public string Width
            {
                get { return this[1]; }
                set { this[1] = value; }
            }

            /// <summary>
            /// Returns a string the represent the height of the multimedia element 
            /// on pixels rendered on a Web Page
            /// </summary>
            public string Height
            {
                get { return this[2]; }
                set { this[2] = value; }
            }
    }
}
